<template>
  <div class="wrapper-two">
    <swiper :options="swiperOption" v-if="showSwiper">
      <swiper-slide v-for="item of swiperTwo" :key="item.id">
        <router-link :to="item.url">
          <img class="swiper-two-img" :src="item.path" alt="">
        </router-link>
      </swiper-slide>
      <!-- <div class="swiper-scrollbar"   slot="scrollbar"></div> -->
    </swiper>
  </div>
</template>

<script>
export default {
  name: 'HomeSwiperTwo',
  props: {
    swiperTwo: Array
  },
  data () {
    return {
      swiperOption: {
        autoplay: 3000,
        loop: true
      }
    }
  },
  computed: {
    showSwiper () {
      return this.swiperTwo.length
    }
  }
}
</script>

<style lang="stylus" scoped>
  .wrapper-two
    overflow: hidden
    width: 100%
    height: 0
    padding-bottom: 50%
    .swiper-two-img
      width: 100%;
      display: block;
      height: auto;
</style>
